package com.fenxiangle.yueding.feature.mine.view.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fenxiangle.yueding.R;
import com.fenxiangle.yueding.entity.CertificationType;
import com.fenxiangle.yueding.entity.bo.TeamBo;
import com.suozhang.framework.framework.AM;

/**
 * @ProjectName: YueDing
 * @Package: com.fenxiangle.yueding.feature.mine.view.adapter
 * @ClassName: MyDemandMagageAdapter
 * @Description: java类作用描述
 * @Author:
 * @CreateDate: 2019/3/5 15:59
 * @UpdateUser: 更新者
 * @UpdateDate: 2019/3/5 15:59
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class MyDemandMagageAdapter extends BaseQuickAdapter<TeamBo,BaseViewHolder> {
    public MyDemandMagageAdapter() {
        super(R.layout.item_my_demand_manage);
    }

    @Override
    protected void convert(BaseViewHolder helper, TeamBo item) {
        helper.setText(R.id.tv_level_name, item.getUserName()+"抢单")
                .setText(R.id.tv_level_id, "信用分:" + (int)item.getCreditScore())
                .setText(R.id.tv_level_member, (item.getGrabStatus()==2?"取消":"选定"))
                .setBackgroundRes(R.id.tv_level_member,(item.getGrabStatus()==1?R.drawable.ic_order_btn_bg:R.color.transparent))
                .setTextColor(R.id.tv_level_member,item.getMembershipLevel()==0?AM.res().getColor(R.color.primary_comparison):AM.res().getColor(R.color.text_remind_3))
                .addOnClickListener(R.id.tv_level_member);
        AM.image().bindToCircleObject(item.getUserHead(),helper.getView(R.id.iv_level_head));
    }
}
